package com.goalias.feign;

import com.goalias.feign.domain.User;
import com.goalias.resp.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;


//@FeignClient(name = "user-manager", path = "/user")
@FeignClient(name = "gateway-security", path = "/user", contextId = "userClient")
public interface UserClient {
    @GetMapping ("/test/hello/{id}")
    String hello(@PathVariable("id") Integer id);

    @PostMapping("/info")
    User info(@RequestBody Long userId);

}
